{extend name="public:edit" /}

<!-- 搜索栏 -->
{block name="content"}
    <style>
        .label_title{
            border-top-width: 2px;
            border-right-width: 0px;
            border-bottom-width: 0px;
            border-left-width: 0px;
            border-style: solid;
            padding-inline-end: 0px;
            padding-block-start: 0px;
            padding-block-end: 0px;
        }

        .label_title legend{
            padding-inline-start: 15px;
            padding-inline-end: 15px;
            line-height: 30px;
            font-size: 16px;
        }

    </style>

    <div class="layui-tab">
        <ul class="layui-tab-title">
            <li class="layui-this">网站设置</li>
            <li>腾讯云存储</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                
                <div class="layui-form-item">
                    <fieldset class="label_title">
                        <legend>网站标题</legend>
                        <input type="text" name="web_title" value="{:isset($info['web_title']) ? $info['web_title'] : ''}" placeholder="点此输入" class="layui-input">
                    </fieldset>
                </div>

                <div class="layui-form-item">
                    <fieldset class="label_title">
                        <legend>网站描述</legend>
                        <input type="text" name="web_describe" value="{:isset($info['web_describe']) ? $info['web_describe'] : ''}" placeholder="点此输入" class="layui-input">
                    </fieldset>
                </div>

                <div class="layui-form-item">
                    <fieldset class="label_title">
                        <legend>网站关键词</legend>
                        <input type="text" name="web_nickname" value="{:isset($info['web_nickname']) ? $info['web_nickname'] : ''}" placeholder="点此输入" class="layui-input">
                    </fieldset>
                </div>

                <div class="layui-form-item">
                    <fieldset class="label_title">
                        <legend>网站域名</legend>
                        <input type="text" name="web_domain" value="{:isset($info['web_domain']) ? $info['web_domain'] : ''}" placeholder="点此输入" class="layui-input">
                    </fieldset>
                </div>

                <div class="layui-form-item">
                    <fieldset class="label_title">
                        <legend>最大登陆错误次数</legend>
                        <input type="text" name="max" value="{:isset($info['max']) ? $info['max'] : ''}" placeholder="点此输入" class="layui-input">
                    </fieldset>
                </div>

                <div class="layui-form-item">
                    <fieldset class="label_title">
                        <legend>禁用IP登陆</legend>
                        <textarea name="ip" placeholder="请输入" class="layui-textarea">{:isset($info['ip']) ? $info['ip'] : ''}</textarea>
                    </fieldset>
                </div>

                <div class="layui-form-item">
                    <fieldset class="label_title">
                        <legend>备案号</legend>
                        <textarea name="records" placeholder="请输入" class="layui-textarea">{:isset($info['records']) ? $info['records'] : ''}</textarea>
                    </fieldset>
                </div>
                <div class="layui-form-item">
                    <fieldset class="label_title">
                        <legend>联系电话</legend>
                        <textarea name="contact_mobile" placeholder="请输入" class="layui-input">{:isset($info['contact_mobile']) ? $info['contact_mobile'] : ''}</textarea>
                    </fieldset>
                </div>
                <div class="layui-form-item">
                    <fieldset class="label_title">
                        <legend>二维码</legend>
                       <!--  <input type="file" name="img"> -->
                        <div class="layui-input-block">
                            <div class="layui-upload">
                                <button type="button" name="ewm_img" number="1" class="layui-btn form-file-pic">选择文件</button>
                                <div class="layui-upload-list">
                                    {if isset($info['ewm_img'])}
                                    <div class="myimg">
                                        <div class="imgcon">
                                            <img src="{$info['ewm_img']}" class="layui-upload-img" style="width: 100px;height: 100px;"
                                                id="test-upload-normal-s">
                                        </div>
                                        <div style="width: 100px;margin-top: 5px;line-height: 17.13px;" class="layui-btn layui-btn-danger layui-btn-xs form-file-del"><i
                                                class="layui-icon"></i></div>
                                    </div>
                                    {/if}
                                </div>
                                
                            </div>
                        </div>
                    </fieldset>
                </div>
                <div class="layui-form-item">
                    <fieldset class="label_title">
                        <legend>网站开关</legend>
                        <input type="radio" name="web_is_off" {:isset($info['web_is_off']) && $info['web_is_off'] == 1 ? 'checked' : ''} value="1" title="开启">
                        <input type="radio" name="web_is_off" {:isset($info['web_is_off']) && $info['web_is_off'] == 0 ? 'checked' : ''} value="0" title="关闭">
                    </fieldset>
                </div>

            </div>

       

            <div class="layui-tab-item">
                <div class="layui-form-item">
                    <fieldset class="label_title">
                        <legend>腾讯云对象存储appid</legend>
                        <input type="text" name="yun_t_appid" value="{:isset($info['yun_t_appid']) ? $info['yun_t_appid'] : ''}" placeholder="点此输入" class="layui-input">
                    </fieldset>
                </div>

                <div class="layui-form-item">
                    <fieldset class="label_title">
                        <legend>腾讯云对象存储key</legend>
                        <input type="text" name="yun_t_key" value="{:isset($info['yun_t_key']) ? $info['yun_t_key'] : ''}" placeholder="点此输入" class="layui-input">
                    </fieldset>
                </div>
                
                <div class="layui-form-item">
                    <fieldset class="label_title">
                        <legend>腾讯云对象存储地区</legend>
                        <input type="text" name="yun_t_diqu" value="{:isset($info['yun_t_diqu']) ? $info['yun_t_diqu'] : ''}" placeholder="点此输入" class="layui-input">
                    </fieldset>
                </div>

                <div class="layui-form-item">
                    <fieldset class="label_title">
                        <legend>腾讯云对象存储水桶</legend>
                        <input type="text" name="yun_t_shuitong" value="{:isset($info['yun_t_shuitong']) ? $info['yun_t_shuitong'] : ''}" placeholder="点此输入" class="layui-input">
                    </fieldset>
                </div>

                <div class="layui-form-item">
                    <fieldset class="label_title">
                        <legend>腾讯云对象存储域名</legend>
                        <input type="text" name="yun_t_yuming" value="{:isset($info['yun_t_yuming']) ? $info['yun_t_yuming'] : ''}" placeholder="点此输入" class="layui-input">
                    </fieldset>
                </div>
            </div>
        </div>
    </div>

{/block}

<!-- js 执行方法 -->
{block name="script"}
<script>
    layui.config({
        base: '/static/ui/' //静态资源所在路径
    }).extend({
        index: '/lib/index' //主入口模块
    }).use(['index', 'form','index'], function(){
        var $ = layui.$
        ,admin = layui.admin
        ,element = layui.element
        ,router = layui.router();
    
        element.render();

        // viewObj.on('submit(component-form-demo1)', function(data){
            //执行重载
            
            // return false;
        // });
        
    });
    views.verify(false).func(function(form,admin,upload,laydate){
        upload.render({
            elem: '#test-upload-normal'
            ,url: '/api/upload/'
            ,auto: false //选择文件后不自动上传
            ,bindAction: '' //指向一个按钮触发上传
            ,size:'1024'
            ,choose: function(obj){
                //将每次选择的文件追加到文件队列
                var files = obj.pushFile();
                
                //预读本地文件，如果是多文件，则会遍历。(不支持ie8/9)
                obj.preview(function(index, file, result){
                    // console.log(index); //得到文件索引
                    layui.$('#test-upload-normal-s').attr('src',result);
                    layui.$('input[name="pic"]').val(result)
                    layui.$('input[name="agency_life_shop_pic"]').val(file.name)
                });
            }
        });      
    }).get();
</script>
{/block}
  
  